﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucListNews.ascx.cs"
    Inherits="TTMarketing.UserControl.ucListNews" %>
<table width="100%">
    <tr>
        <td>
            <asp:ObjectDataSource ID="odsNews" runat="server" SelectMethod="getByType" TypeName="TTBusiness.ClassDB.clsBSNews">
                <selectparameters>
        <asp:Parameter DefaultValue="6" Name="typeid" Type="Int32" />
        <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
    </selectparameters>
            </asp:ObjectDataSource>
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="odsNews" BorderWidth="0px"
                ItemPlaceholderID="ph" AllowPaging="True" PageSize="15" Width="100%">
                <LayoutTemplate>
                    <asp:PlaceHolder runat="server" id="ph" />
                </LayoutTemplate>
                <ItemTemplate>
                    <table width="100%" id="News-l">
                        <tr>
                            <td align="left" colspan="2" valign="top">
                                <a href='<%# "/tin-tuc.aspx?id="+Eval("ID") %>' style="font-weight: bold">
                                    <%# Eval("Title") %>
                                </a><span style="font-size: 10px; color: Gray;">
                                    <%#Eval("Date") %></span>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" width="100px">
                            <a href='<%# "/tin-tuc.aspx?id="+Eval("ID") %>' title='<%# Eval("Title") %>' style="text-decoration:none;" >
                                <img alt='<%# Eval("Title") %>' class="news-photo" src='<%# "~/Image/Upload/" +Eval("Image") %>'/>
                            </a>
                            </td>
                            <td align="left" valign="top">
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Summary") %>'></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <div class="RadListView RadListView_Default">
                        <div class="rlvEmpty">
                            Dữ liệu đang cập nhật</div>
                    </div>
                </EmptyDataTemplate>
            </telerik:RadListView>
        </td>
    </tr>
    <tr>
        <td>
            <div id="pageing">
                <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                    BackColor="White" BorderStyle="None" PageSize="10" Skin="Sitefinity" Width="90%">
                    <Fields>
                        <telerik:RadDataPagerSliderField />
                        <telerik:RadDataPagerPageSizeField />
                    </Fields>
                </telerik:RadDataPager>
            </div>
        </td>
    </tr>
</table>
